McAxisParameter enumeration

The parameters that are available to use in the application.

Namespace: IntervalZero.KINGSTAR.Base

Assembly: IntervalZero.KINGSTAR.Base (in IntervalZero.KINGSTAR.Base.dll) Version: 4.4.0.0

Syntax

C#VB
public enum McAxisParameter
Public Enum McAxisParameter

Members

PLCopen standard

Name Value Data type R/W Meaning
mcCommandedPosition 1 double R Commanded position.
mcSoftLimitPositive 2 double R/W Positive software limit switch position. If the commanded value is greater than this, the axis will move forwards and stops when it reaches the software limit switch.
mcSoftLimitNegative 3 double R/W Negative software limit switch position. If the commanded value is less than this, the axis will move backwards and stops when it reaches the software limit switch.
mcEnableLimitPositive 4 double R/W Enables positive software limit switch.
mcEnableLimitNegative 5 double R/W Enables negative software limit switch.
mcEnablePosLagMonitoring 6 double R/W Enables monitoring for the position lag (following error).
mcMaxPositionLag 7 double R/W Maximum position error (following error).
mcMaxVelocitySystem 8 double R/W Maximum velocity of the axis in the motion system.
mcMaxVelocityApplication 9 double R/W Maximum velocity of the axis in the application.
mcActualVelocity 10 double R Actual velocity.
mcCommandedVelocity 11 double R Commanded velocity.
mcMaxAccelerationSystem 12 double R Maximum acceleration of the axis in the motion system.
mcMaxAccelerationApplication 13 double R/W Maximum acceleration of the axis in the application.
mcMaxDecelerationSystem 14 double R Maximum deceleration of the axis in the motion system.
mcMaxDecelerationApplication 15 double R/W Maximum deceleration of the axis in the application.
mcMaxJerkSystem 16 double R Maximum jerk of the axis in the motion system.
mcMaxJerkApplication 17 double R/W Maximum jerk of the axis in the application.

Axis configuration

Name Value Data type R/W Meaning
mcAlias 1001 double R/W Alias of the axis.
mcInterpolationTime 1002 double R/W Sets the interpolation time for an axis. Unit: second.
mcAvailableControlModes 1003 double double The available control modes of an axis.
mcControlMode 1004 double R/W Changes the control mode of an axis at run time. The control mode must be compatible with the current access mode. Not all axes support control mode changes at run time.
mcHomeSwitchModuleType 1005 double R/W Configures the home sensor. Set to TRUE if the sensor is connected to an axis input; set to FALSE if it is connected to an I/O module.
mcHomeSwitchModuleIndex 1006 double R/W Configures the home sensor. It identifies which I/O module or axis contains the sensor. Aliases affect this parameter. When no sensor is assigned, the value is -1.
mcHomeSwitchOffset 1007 double R/W Configures the home sensor. It's the offset of the digital input in the I/O module input buffer.
mcHomeSwitchInvert 1008 double R/W Configures the home sensor. It determines whether to invert the sensor value.
mcPositiveLimitSwitchModuleType 1009 double R/W Configures the maximum limit sensor. Set to TRUE if the sensor is connected to an axis input; set to FALSE if it is connected to an I/O module.
mcPositiveLimitSwitchModuleIndex 1010 double R/W Configures the maximum limit sensor. It identifies which I/O module or axis contains the sensor. Aliases affect this parameter.
mcPositiveLimitSwitchOffset 1011 double R/W Configures the maximum limit sensor. It's the offset of the digital input in the I/O module input buffer.
mcPositiveLimitSwitchInvert 1012 double R/W Configures the maximum limit sensor and inverts the sensor value.
mcNegativeLimitSwitchModuleType 1013 double R/W Configures the minimum limit sensor. Set to TRUE if the sensor is connected to an axis input; set to FALSE if it is connected to an I/O module.
mcNegativeLimitSwitchModuleIndex 1014 double R/W Configures the minimum limit sensor. It identifies which I/O module or axis contains the sensor. Aliases affect this parameter.
mcNegativeLimitSwitchOffset 1015 double R/W Configures the minimum limit sensor. It's the offset of the digital input in the I/O module input buffer.
mcNegativeLimitSwitchInvert 1016 double R/W Configures the minimum limit sensor. It determines whether to invert the sensor value.
mcSoftwareLimitPositive 1017 double R/W Positive software limit of the axis.
mcSoftwareLimitNegative 1018 double R/W Negative software limit of the axis.
mcEnablePositiveLimitSwitch 1019 double R/W Enables or disables the maximum limit sensor.
mcEnableNegativeLimitSwitch 1020 double R/W Enables or disables the minimum limit sensor.
mcEnableSoftwareLimitPositive 1021 double R/W Enables or disables the positive software limit switch.
mcEnableSoftwareLimitNegative 1022 double R/W Enables or disables the negative software limit switch.
mcEnableFollowingErrorMonitoring 1023 double R/W Enables or disables monitoring for the following error.
mcCountPerUnitNumerator 1024 double R/W Sets the conversion ratio of user-defined position unit to the pulse unit used by the axis. Used to convert the drive unit to the user unit. For example, if the device is an encoder, typically the numerator is the resolution of the encoder.
mcCountPerUnitDenominator 1025 double R/W Sets the conversion ratio of user-defined position unit to the pulse unit used by the axis. Used to convert the drive unit to the user unit. For example, if you're using degree, the value will be 360 since there are 360 degrees in one revolution.
mcCountPerUnitReverse 1026 double R/W Reverses the direction the servo motor rotates.
mcSecondaryCountPerUnitNumerator 1027 double R/W Sets the conversion ratio of user-defined position unit to the pulse unit used by the axis. Used to convert the drive unit to the user unit. For example, if the device is an encoder, typically the numerator is the resolution of the encoder.
mcSecondaryCountPerUnitDenominator 1028 double R/W Sets the conversion ratio of user-defined position unit to the pulse unit used by the axis. Used to convert the drive unit to the user unit. For example, if you're using degree, the value will be 360 since there are 360 degrees in one revolution.
mcSecondaryCountPerUnitReverse 1029 double R/W Reverses the direction the servo motor rotates.
mcPosToVelRatio 1030 double R/W Converts the velocity from count per second to the unit a servo drive uses.
mcTorquePolarityReverse 1031 double R/W Reverses the direction of an axis' torque.
mcRealUnitConversion 1032 double R/W Sets the axis to use a real-world unit or pulse unit.
mcActualFollowingError 1033 double R/W Current following error.
mcEnablePositiveDirection 1034 double R/W Enables the positive direction.
mcEnableNegativeDirection 1035 double R/W Enables the negative direction.
mcModuloAxisValue 1085 double R/W

Sets the modulo axis value, e.g., 360°, for a rotary axis. The default value is UINT_MAX.

If the function succeeds, it returns errNoError. If the function fails, it returns one of the following errors:

  • errWrongParamger: The modulo axis value is less than or equal to 0.
  • errWrongAxisState: The axis is not in a Standstill state when setting the modulo axis value.
mcEnableModuloAxis 1086 double R/W

Enables or disables the modulo axis. After enabling this parameter, set the modulo axis value. Otherwise, the default value (UINT_MAX) will be applied.

If the function succeeds, it returns errNoError. If the function fails, it returns one of the following errors:

  • errWrongAxisState: The axis is not in a Standstill state when setting the modulo axis value.
  • errWrongEnvironment: The modulo axis is enabled after adding the axis to a group.

Motion and PID

mcJolt is not available in the current KINGSTAR version.

Name Value Data type R/W Meaning
mcMotionProfileType 1036 double R/W Sets the unit of acceleration and jerk parameters for an axis.
mcMinimumFollowingError 1037 double R/W Minimum following error. If the distance between the target position and actual position is less than this value, the axis is considered at the target position and the motion will be stopped.
mcMaximumFollowingError 1038 double R/W Maximum following error.
mcMaximumVelocity 1039 double R/W Maximum velocity to be used by the interpolation.
mcAcceleration 1040 double R/W Maximum acceleration for the interpolation.
mcDeceleration 1041 double R/W Maximum deceleration for the interpolation.
mcJerk 1042 double R/W Maximum jerk for the interpolation.
mcJolt 1043 double R/W Maximum jolt for the interpolation.
mcFeedbackDelay 1044 double R/W Feedback delay is the time between KINGSTAR sends a command and receives the result from the servo drive. To make sure the axis reaches the target position (or velocity, torque), KINGSTAR compares the actual position with the commanded position sent from a few cycles before. FeedBackDelay is the number of the cycles that KINGSTAR backtracks. Usually it's 3 cycles.
mcVelocityKP 1045 double R/W Proportional gain in the velocity mode.
mcVelocityKI 1046 double R/W Integral gain in the velocity mode.
mcVelocityKILimitPercent 1047 double R/W The maximum integral error in percent of the maximum output. For example, if the maximum velocity is 50, KILimitPercent is 10, the maximum intergral error of velocity is 5.
mcVelocityKD 1048 double R/W Derivative gain in the velocity mode.
mcVelocityKV 1049 double R/W Velocity feedforward gain in the velocity mode.
mcVelocityKAA 1050 double R/W Acceleration feedforward gain in the velocity mode.
mcVelocityKAD 1051 double R/W Deceleration feedforward gain in the velocity mode.
mcVelocityKJ 1052 double R/W Jerk feedforward gain in the velocity mode.
mcVelocityReducedGainsDelay 1053 double R/W Determines when the axis starts using mcVelocityRgFactor after finishing the move. Unit: Second.
mcVelocityRgFactor 1054 double R/W KP, KI, and KD multiplied by this factor after mcVelocityReducedGainsDelay.
mcVelocityKIStoppedOnly 1055 double R/W Uses KI on the steady-state error in the velocity mode.
mcVelocityKDUseSecondEncoder 1056 double R/W Uses the internal position encoder for KD in the velocity mode.
mcVelocityMinimumOutput 1057 double R/W Minimum output of the PID. Minimum velocity.
mcVelocityMaximumOutput 1058 double R/W Maximum output of the PID. Maximum velocity.
mcTorqueKP 1059 double R/W Proportional gain in the torque mode.
mcTorqueKI 1060 double R/W Integral gain in the torque mode.
mcTorqueKILimitPercent 1061 double R/W The maximum integral error in percent of the maximum output. For example, if the maximum torque is 50%, KILimitPercent is 10%, the maximum intergral error is 5% of the torque.
mcTorqueKD 1062 double R/W Derivative gain in the torque mode.
mcTorqueKV 1063 double R/W Velocity feedforward gain in the torque mode.
mcTorqueKAA 1064 double R/W Acceleration feedforward gain in the torque mode.
mcTorqueKAD 1065 double R/W Deceleration feedforward gain in the torque mode.
mcTorqueKJ 1066 double R/W Jerk feedforward gain in the torque mode.
mcTorqueReducedGainsDelay 1067 double R/W Determines when an axis starts using mcTorqueRgFactor after finishing the move. Unit: Second.
mcTorqueRgFactor 1068 double R/W KP, KI, and KD multiplied by this factor after mcTorqueReducedGainsDelay.
mcTorqueKIStoppedOnly 1069 double R/W Uses KI on the steady-state error in the torque mode.
mcTorqueKDUseSecondEncoder 1070 double R/W Uses the internal position encoder for KD in the torque mode.
mcTorqueMinimumOutput 1071 double R/W Minimum output of the PID. Minimum torque in %.
mcTorqueMaximumOutput 1072 double R/W Maximum output of the PID. Maximum torque in %.

mcMotionStatusFilterDepth

1083

double

R/W

Configures the filter depth value, in cycle counts, that the actual position must stay within the target range. When motion interpolation is finished and the condition is met, the motion command state will be set to Done.

Graphical Example:

At this moment, the interpolation is finished, the axis's actual position is within the target range, and the motion status filter starts counting. Once the filter depth value is reached, the motion command state will be set to Done.

mcFollowActPosDuringPowerOn

1084

double

R/W

Configures whether the target position should follow the actual position during the axis power-on process.

Set to TRUE for the target position to follow the actual position during the axis power-on process; set to FALSE (default) to fix the target position during the axis power-on process.

Homing

Name Value Data type R/W Meaning
mcSlaveHomeOffset 1073 double R/W The offset between the home position and home sensor.
mcSlaveHomingMode 1074 double R/W Selects one of the homing modes offered by a servo drive.
mcSlaveControlLimit 1075 double R/W Determines whether to use the limit (such as software and sensor limit) when Slave Interpolation (modeSlaveInt) control mode and homingSlave mode are used.
mcCancelHome 1076 double

R

W

Read – returns the IsHomed signal (flag).

Write – TRUE: cancels the IsHomed signal. FALSE: do nothing.

Backlash compensation

Backlash is caused by the space between gears and ball screws. It is a position error that occurs when switching directions due to small gaps between gears.

Name Value Data type R/W Meaning
mcBacklashMode 1077 double R/W

0: No backlash compensation.

1: Single error backlash compensation: the backlash error is the same when going from forward-to-reverse and from reverse-to-forward. The error is measured and provided in the mcBacklashError parameter. It will be used for the compensation.

2: Dual error backlash compensation: the backlash error is different when going from forward-to-reverse and from reverse-to-forward. The error to compensate for reverse-to-forward is given to mcBacklashError and the error to compnesate for forward-to-reverse is given to mcBacklashReverseError.

mcBacklashError 1078 double R/W

In user units.

Mode 1: it contains an error to compensate for either forward-to-reverse or reverse-to-forward.

Mode 2: it contains an error to compensate for reverse-to-forward.

mcBacklashReverseError 1079 double R/W In user units. It contains an error to compensate for forward-to-reverse.

Illustration

Override factors

Name Value Data type R/W Meaning
mcVelocityFactor 1080 double R/W The new override factor for velocity.
mcAccelerationFactor 1081 double R/W The new override factor for acceleration or deceleration.
mcJerkFactor 1082 double R/W The new override factor for jerk.

See also

IntervalZero.KINGSTAR.Base Namespace